﻿<Page
    x:Class="App1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.BottomAppBar>
        <AppBar>

        </AppBar>
    </Page.BottomAppBar>
    <Hub>
        <HubSection Header="Favorites">
            <DataTemplate>
                <GridView ItemsSource="{Binding Favorites}" SelectedItem="{Binding NewPage}">
                    <GridView.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Key}" Width="300"/>
                        </DataTemplate>
                    </GridView.ItemTemplate>
                </GridView>
            </DataTemplate>
        </HubSection>
        <HubSection Header="Visit new" DataContext="{Binding NewPage}">
            <DataTemplate>
                <StackPanel Width="548">
                    <TextBox Header="Web URL" Text="{Binding Url,Mode=TwoWay}" HorizontalContentAlignment="Stretch" Margin="20"/>
                    <ComboBox SelectedItem="{Binding RequestType,Mode=TwoWay}" HorizontalContentAlignment="Stretch" Margin="20">
                        <ComboBoxItem>GET</ComboBoxItem>
                        <ComboBoxItem>POST</ComboBoxItem>
                    </ComboBox>
                    <TextBox  TextWrapping="Wrap" Text="{Binding Body,Mode=TwoWay}" AcceptsReturn="True" Height="300" ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="20"/>
                    <StackPanel Orientation="Horizontal">
                        <Button Content="Open" Click="ButtonOpen_Click"  HorizontalContentAlignment="Stretch" Margin="20"/>
                        <Button Content="New" Click="ButtonNew_Click"  HorizontalContentAlignment="Stretch" Margin="20"/>
                        <Button Content="Add to favorties" Click="ButtonFavorite_Click"  HorizontalContentAlignment="Stretch" Margin="20"/>
                    </StackPanel>
                </StackPanel>
            </DataTemplate>
        </HubSection>
    </Hub>
</Page>
